package com.jarvis.product.controller;

import com.jarvis.product.entity.ProductEntity;
import com.jarvis.product.service.ProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class FeignController {

    @Autowired
    private ProductService productService;

    @RequestMapping("/order/{productId}")
    public ProductEntity getProductEntity(@PathVariable("productId") long productId){
        return productService.getProduct(productId);
    }

}
